package com.ruoyi.yanjing.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yanjing.mapper.PersonnelCertificatesMapper;
import com.ruoyi.yanjing.domain.PersonnelCertificates;
import com.ruoyi.yanjing.service.IPersonnelCertificatesService;

/**
 * 人员证件信息Service业务层处理
 * 
 * @author whz
 * @date 2024-12-04
 */
@Service
public class PersonnelCertificatesServiceImpl implements IPersonnelCertificatesService 
{
    @Autowired
    private PersonnelCertificatesMapper personnelCertificatesMapper;

    /**
     * 查询人员证件信息
     * 
     * @param id 人员证件信息主键
     * @return 人员证件信息
     */
    @Override
    public PersonnelCertificates selectPersonnelCertificatesById(Long id)
    {
        return personnelCertificatesMapper.selectPersonnelCertificatesById(id);
    }

    /**
     * 查询人员证件信息列表
     * 
     * @param personnelCertificates 人员证件信息
     * @return 人员证件信息
     */
    @Override
    public List<PersonnelCertificates> selectPersonnelCertificatesList(PersonnelCertificates personnelCertificates)
    {
        return personnelCertificatesMapper.selectPersonnelCertificatesList(personnelCertificates);
    }

    /**
     * 新增人员证件信息
     * 
     * @param personnelCertificates 人员证件信息
     * @return 结果
     */
    @Override
    public int insertPersonnelCertificates(PersonnelCertificates personnelCertificates)
    {
        personnelCertificates.setCreateTime(DateUtils.getNowDate());
        return personnelCertificatesMapper.insertPersonnelCertificates(personnelCertificates);
    }

    /**
     * 修改人员证件信息
     * 
     * @param personnelCertificates 人员证件信息
     * @return 结果
     */
    @Override
    public int updatePersonnelCertificates(PersonnelCertificates personnelCertificates)
    {
        personnelCertificates.setUpdateTime(DateUtils.getNowDate());
        return personnelCertificatesMapper.updatePersonnelCertificates(personnelCertificates);
    }

    /**
     * 批量删除人员证件信息
     * 
     * @param ids 需要删除的人员证件信息主键
     * @return 结果
     */
    @Override
    public int deletePersonnelCertificatesByIds(Long[] ids)
    {
        return personnelCertificatesMapper.deletePersonnelCertificatesByIds(ids);
    }

    /**
     * 删除人员证件信息信息
     * 
     * @param id 人员证件信息主键
     * @return 结果
     */
    @Override
    public int deletePersonnelCertificatesById(Long id)
    {
        return personnelCertificatesMapper.deletePersonnelCertificatesById(id);
    }
}
